Optimal. Leaf size=293 \[ -\frac {b^2 c^2 d^3}{12 x^2}-\frac {i b^2 c^3 d^3}{x}-i b^2 c^4 d^3 \text {ArcTan}(c x)-\frac {b c d^3 (a+b \text {ArcTan}(c x))}{6 x^3}-\frac {i b c^2 d^3 (a+b \text {ArcTan}(c x))}{x^2}+\frac {7 b c^3 d^3 (a+b \text {ArcTan}(c x))}{2 x}-\frac {d^3 (1+i c x)^4 (a+b \text {ArcTan}(c x))^2}{4 x^4}-4 i a b c^4 d^3 \log (x)-\frac {11}{3} b^2 c^4 d^3 \log (x)-4 i b c^4 d^3 (a+b \text {ArcTan}(c x)) \log \left (\frac {2}{1-i c x}\right )+\frac {11}{6} b^2 c^4 d^3 \log \left (1+c^2 x^2\right )+2 b^2 c^4 d^3 \text {PolyLog}(2,-i c x)-2 b^2 c^4 d^3 \text {PolyLog}(2,i c x)-2 b^2 c^4 d^3 \text {PolyLog}\left (2,1-\frac {2}{1-i c x}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.25, antiderivative size = 293, normalized size of antiderivative = 1.00, number
of steps used = 20, number of rules used = 15, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.600, Rules
used = {37, 4994, 4946, 272, 46, 331, 209, 36, 29, 31, 4940, 2438, 4964, 2449, 2352}
\begin {gather*} -4 i b c^4 d^3 \log \left (\frac {2}{1-i c x}\right ) (a+b \text {ArcTan}(c x))+\frac {7 b c^3 d^3 (a+b \text {ArcTan}(c x))}{2 x}-\frac {i b c^2 d^3 (a+b \text {ArcTan}(c x))}{x^2}-\frac {d^3 (1+i c x)^4 (a+b \text {ArcTan}(c x))^2}{4 x^4}-\frac {b c d^3 (a+b \text {ArcTan}(c x))}{6 x^3}-4 i a b c^4 d^3 \log (x)-i b^2 c^4 d^3 \text {ArcTan}(c x)+2 b^2 c^4 d^3 \text {Li}_2(-i c x)-2 b^2 c^4 d^3 \text {Li}_2(i c x)-2 b^2 c^4 d^3 \text {Li}_2\left (1-\frac {2}{1-i c x}\right )-\frac {11}{3} b^2 c^4 d^3 \log (x)-\frac {i b^2 c^3 d^3}{x}-\frac {b^2 c^2 d^3}{12 x^2}+\frac {11}{6} b^2 c^4 d^3 \log \left (c^2 x^2+1\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 29
Rule 31
Rule 36
Rule 37
Rule 46
Rule 209
Rule 272
Rule 331
Rule 2352
Rule 2438
Rule 2449
Rule 4940
Rule 4946
Rule 4964
Rule 4994
Rubi steps
\begin {align*} \int \frac {(d+i c d x)^3 \left (a+b \tan ^{-1}(c x)\right )^2}{x^5} \, dx &=-\frac {d^3 (1+i c x)^4 \left (a+b \tan ^{-1}(c x)\right )^2}{4 x^4}-(2 b c) \int \left (-\frac {d^3 \left (a+b \tan ^{-1}(c x)\right )}{4 x^4}-\frac {i c d^3 \left (a+b \tan ^{-1}(c x)\right )}{x^3}+\frac {7 c^2 d^3 \left (a+b \tan ^{-1}(c x)\right )}{4 x^2}+\frac {2 i c^3 d^3 \left (a+b \tan ^{-1}(c x)\right )}{x}-\frac {2 i c^4 d^3 \left (a+b \tan ^{-1}(c x)\right )}{i+c x}\right ) \, dx\\ &=-\frac {d^3 (1+i c x)^4 \left (a+b \tan ^{-1}(c x)\right )^2}{4 x^4}+\frac {1}{2} \left (b c d^3\right ) \int \frac {a+b \tan ^{-1}(c x)}{x^4} \, dx+\left (2 i b c^2 d^3\right ) \int \frac {a+b \tan ^{-1}(c x)}{x^3} \, dx-\frac {1}{2} \left (7 b c^3 d^3\right ) \int \frac {a+b \tan ^{-1}(c x)}{x^2} \, dx-\left (4 i b c^4 d^3\right ) \int \frac {a+b \tan ^{-1}(c x)}{x} \, dx+\left (4 i b c^5 d^3\right ) \int \frac {a+b \tan ^{-1}(c x)}{i+c x} \, dx\\ &=-\frac {b c d^3 \left (a+b \tan ^{-1}(c x)\right )}{6 x^3}-\frac {i b c^2 d^3 \left (a+b \tan ^{-1}(c x)\right )}{x^2}+\frac {7 b c^3 d^3 \left (a+b \tan ^{-1}(c x)\right )}{2 x}-\frac {d^3 (1+i c x)^4 \left (a+b \tan ^{-1}(c x)\right )^2}{4 x^4}-4 i a b c^4 d^3 \log (x)-4 i b c^4 d^3 \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2}{1-i c x}\right )+\frac {1}{6} \left (b^2 c^2 d^3\right ) \int \frac {1}{x^3 \left (1+c^2 x^2\right )} \, dx+\left (i b^2 c^3 d^3\right ) \int \frac {1}{x^2 \left (1+c^2 x^2\right )} \, dx+\left (2 b^2 c^4 d^3\right ) \int \frac {\log (1-i c x)}{x} \, dx-\left (2 b^2 c^4 d^3\right ) \int \frac {\log (1+i c x)}{x} \, dx-\frac {1}{2} \left (7 b^2 c^4 d^3\right ) \int \frac {1}{x \left (1+c^2 x^2\right )} \, dx+\left (4 i b^2 c^5 d^3\right ) \int \frac {\log \left (\frac {2}{1-i c x}\right )}{1+c^2 x^2} \, dx\\ &=-\frac {i b^2 c^3 d^3}{x}-\frac {b c d^3 \left (a+b \tan ^{-1}(c x)\right )}{6 x^3}-\frac {i b c^2 d^3 \left (a+b \tan ^{-1}(c x)\right )}{x^2}+\frac {7 b c^3 d^3 \left (a+b \tan ^{-1}(c x)\right )}{2 x}-\frac {d^3 (1+i c x)^4 \left (a+b \tan ^{-1}(c x)\right )^2}{4 x^4}-4 i a b c^4 d^3 \log (x)-4 i b c^4 d^3 \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2}{1-i c x}\right )+2 b^2 c^4 d^3 \text {Li}_2(-i c x)-2 b^2 c^4 d^3 \text {Li}_2(i c x)+\frac {1}{12} \left (b^2 c^2 d^3\right ) \text {Subst}\left (\int \frac {1}{x^2 \left (1+c^2 x\right )} \, dx,x,x^2\right )-\frac {1}{4} \left (7 b^2 c^4 d^3\right ) \text {Subst}\left (\int \frac {1}{x \left (1+c^2 x\right )} \, dx,x,x^2\right )-\left (4 b^2 c^4 d^3\right ) \text {Subst}\left (\int \frac {\log (2 x)}{1-2 x} \, dx,x,\frac {1}{1-i c x}\right )-\left (i b^2 c^5 d^3\right ) \int \frac {1}{1+c^2 x^2} \, dx\\ &=-\frac {i b^2 c^3 d^3}{x}-i b^2 c^4 d^3 \tan ^{-1}(c x)-\frac {b c d^3 \left (a+b \tan ^{-1}(c x)\right )}{6 x^3}-\frac {i b c^2 d^3 \left (a+b \tan ^{-1}(c x)\right )}{x^2}+\frac {7 b c^3 d^3 \left (a+b \tan ^{-1}(c x)\right )}{2 x}-\frac {d^3 (1+i c x)^4 \left (a+b \tan ^{-1}(c x)\right )^2}{4 x^4}-4 i a b c^4 d^3 \log (x)-4 i b c^4 d^3 \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2}{1-i c x}\right )+2 b^2 c^4 d^3 \text {Li}_2(-i c x)-2 b^2 c^4 d^3 \text {Li}_2(i c x)-2 b^2 c^4 d^3 \text {Li}_2\left (1-\frac {2}{1-i c x}\right )+\frac {1}{12} \left (b^2 c^2 d^3\right ) \text {Subst}\left (\int \left (\frac {1}{x^2}-\frac {c^2}{x}+\frac {c^4}{1+c^2 x}\right ) \, dx,x,x^2\right )-\frac {1}{4} \left (7 b^2 c^4 d^3\right ) \text {Subst}\left (\int \frac {1}{x} \, dx,x,x^2\right )+\frac {1}{4} \left (7 b^2 c^6 d^3\right ) \text {Subst}\left (\int \frac {1}{1+c^2 x} \, dx,x,x^2\right )\\ &=-\frac {b^2 c^2 d^3}{12 x^2}-\frac {i b^2 c^3 d^3}{x}-i b^2 c^4 d^3 \tan ^{-1}(c x)-\frac {b c d^3 \left (a+b \tan ^{-1}(c x)\right )}{6 x^3}-\frac {i b c^2 d^3 \left (a+b \tan ^{-1}(c x)\right )}{x^2}+\frac {7 b c^3 d^3 \left (a+b \tan ^{-1}(c x)\right )}{2 x}-\frac {d^3 (1+i c x)^4 \left (a+b \tan ^{-1}(c x)\right )^2}{4 x^4}-4 i a b c^4 d^3 \log (x)-\frac {11}{3} b^2 c^4 d^3 \log (x)-4 i b c^4 d^3 \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2}{1-i c x}\right )+\frac {11}{6} b^2 c^4 d^3 \log \left (1+c^2 x^2\right )+2 b^2 c^4 d^3 \text {Li}_2(-i c x)-2 b^2 c^4 d^3 \text {Li}_2(i c x)-2 b^2 c^4 d^3 \text {Li}_2\left (1-\frac {2}{1-i c x}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.51, size = 322, normalized size = 1.10 \begin {gather*} \frac {d^3 \left (-3 a^2-12 i a^2 c x-2 a b c x+18 a^2 c^2 x^2-12 i a b c^2 x^2-b^2 c^2 x^2+12 i a^2 c^3 x^3+42 a b c^3 x^3-12 i b^2 c^3 x^3-b^2 c^4 x^4-3 b^2 (-i+c x)^4 \text {ArcTan}(c x)^2+2 b \text {ArcTan}(c x) \left (b c x \left (-1-6 i c x+21 c^2 x^2-6 i c^3 x^3\right )+3 a \left (-1-4 i c x+6 c^2 x^2+4 i c^3 x^3+7 c^4 x^4\right )-24 i b c^4 x^4 \log \left (1-e^{2 i \text {ArcTan}(c x)}\right )\right )-48 i a b c^4 x^4 \log (c x)-44 b^2 c^4 x^4 \log \left (\frac {c x}{\sqrt {1+c^2 x^2}}\right )+24 i a b c^4 x^4 \log \left (1+c^2 x^2\right )-24 b^2 c^4 x^4 \text {PolyLog}\left (2,e^{2 i \text {ArcTan}(c x)}\right )\right )}{12 x^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 700 vs. \(2 (271 ) = 542\).
time = 0.71, size = 701, normalized size = 2.39
method | result | size |
derivativedivides | \(c^{4} \left (-\frac {d^{3} a b \arctan \left (c x \right )}{2 c^{4} x^{4}}+\frac {2 i d^{3} a b \arctan \left (c x \right )}{c x}-\frac {2 i d^{3} a b \arctan \left (c x \right )}{c^{3} x^{3}}+2 i d^{3} b^{2} \arctan \left (c x \right ) \ln \left (c^{2} x^{2}+1\right )+2 i d^{3} a b \ln \left (c^{2} x^{2}+1\right )-\frac {i d^{3} a b}{c^{2} x^{2}}-\frac {i d^{3} b^{2} \arctan \left (c x \right )}{c^{2} x^{2}}-\frac {i d^{3} b^{2} \arctan \left (c x \right )^{2}}{c^{3} x^{3}}-\frac {d^{3} a b}{6 c^{3} x^{3}}-\frac {d^{3} b^{2} \arctan \left (c x \right )}{6 c^{3} x^{3}}-\frac {d^{3} b^{2} \arctan \left (c x \right )^{2}}{4 c^{4} x^{4}}-\frac {d^{3} b^{2}}{12 c^{2} x^{2}}+2 d^{3} b^{2} \dilog \left (i c x +1\right )-2 d^{3} b^{2} \dilog \left (-i c x +1\right )+a^{2} d^{3} \left (\frac {3}{2 c^{2} x^{2}}-\frac {i}{c^{3} x^{3}}+\frac {i}{c x}-\frac {1}{4 c^{4} x^{4}}\right )-2 d^{3} b^{2} \ln \left (c x \right ) \ln \left (-i c x +1\right )+2 d^{3} b^{2} \ln \left (c x \right ) \ln \left (i c x +1\right )+\frac {7 d^{3} a b \arctan \left (c x \right )}{2}-\frac {11 d^{3} b^{2} \ln \left (c x \right )}{3}+\frac {7 d^{3} b^{2} \arctan \left (c x \right )^{2}}{4}+\frac {3 d^{3} a b \arctan \left (c x \right )}{c^{2} x^{2}}+d^{3} b^{2} \ln \left (c x -i\right ) \ln \left (-\frac {i \left (c x +i\right )}{2}\right )-i d^{3} b^{2} \arctan \left (c x \right )+d^{3} b^{2} \ln \left (c x +i\right ) \ln \left (c^{2} x^{2}+1\right )-d^{3} b^{2} \ln \left (c x +i\right ) \ln \left (\frac {i \left (c x -i\right )}{2}\right )-d^{3} b^{2} \ln \left (c x -i\right ) \ln \left (c^{2} x^{2}+1\right )-\frac {d^{3} b^{2} \ln \left (c x +i\right )^{2}}{2}+\frac {d^{3} b^{2} \ln \left (c x -i\right )^{2}}{2}-d^{3} b^{2} \dilog \left (\frac {i \left (c x -i\right )}{2}\right )+d^{3} b^{2} \dilog \left (-\frac {i \left (c x +i\right )}{2}\right )+\frac {11 b^{2} d^{3} \ln \left (c^{2} x^{2}+1\right )}{6}+\frac {7 d^{3} a b}{2 c x}+\frac {3 d^{3} b^{2} \arctan \left (c x \right )^{2}}{2 c^{2} x^{2}}-4 i d^{3} b^{2} \arctan \left (c x \right ) \ln \left (c x \right )-\frac {i d^{3} b^{2}}{c x}+\frac {7 d^{3} b^{2} \arctan \left (c x \right )}{2 c x}+\frac {i d^{3} b^{2} \arctan \left (c x \right )^{2}}{c x}-4 i d^{3} a b \ln \left (c x \right )\right )\) | \(701\) |
default | \(c^{4} \left (-\frac {d^{3} a b \arctan \left (c x \right )}{2 c^{4} x^{4}}+\frac {2 i d^{3} a b \arctan \left (c x \right )}{c x}-\frac {2 i d^{3} a b \arctan \left (c x \right )}{c^{3} x^{3}}+2 i d^{3} b^{2} \arctan \left (c x \right ) \ln \left (c^{2} x^{2}+1\right )+2 i d^{3} a b \ln \left (c^{2} x^{2}+1\right )-\frac {i d^{3} a b}{c^{2} x^{2}}-\frac {i d^{3} b^{2} \arctan \left (c x \right )}{c^{2} x^{2}}-\frac {i d^{3} b^{2} \arctan \left (c x \right )^{2}}{c^{3} x^{3}}-\frac {d^{3} a b}{6 c^{3} x^{3}}-\frac {d^{3} b^{2} \arctan \left (c x \right )}{6 c^{3} x^{3}}-\frac {d^{3} b^{2} \arctan \left (c x \right )^{2}}{4 c^{4} x^{4}}-\frac {d^{3} b^{2}}{12 c^{2} x^{2}}+2 d^{3} b^{2} \dilog \left (i c x +1\right )-2 d^{3} b^{2} \dilog \left (-i c x +1\right )+a^{2} d^{3} \left (\frac {3}{2 c^{2} x^{2}}-\frac {i}{c^{3} x^{3}}+\frac {i}{c x}-\frac {1}{4 c^{4} x^{4}}\right )-2 d^{3} b^{2} \ln \left (c x \right ) \ln \left (-i c x +1\right )+2 d^{3} b^{2} \ln \left (c x \right ) \ln \left (i c x +1\right )+\frac {7 d^{3} a b \arctan \left (c x \right )}{2}-\frac {11 d^{3} b^{2} \ln \left (c x \right )}{3}+\frac {7 d^{3} b^{2} \arctan \left (c x \right )^{2}}{4}+\frac {3 d^{3} a b \arctan \left (c x \right )}{c^{2} x^{2}}+d^{3} b^{2} \ln \left (c x -i\right ) \ln \left (-\frac {i \left (c x +i\right )}{2}\right )-i d^{3} b^{2} \arctan \left (c x \right )+d^{3} b^{2} \ln \left (c x +i\right ) \ln \left (c^{2} x^{2}+1\right )-d^{3} b^{2} \ln \left (c x +i\right ) \ln \left (\frac {i \left (c x -i\right )}{2}\right )-d^{3} b^{2} \ln \left (c x -i\right ) \ln \left (c^{2} x^{2}+1\right )-\frac {d^{3} b^{2} \ln \left (c x +i\right )^{2}}{2}+\frac {d^{3} b^{2} \ln \left (c x -i\right )^{2}}{2}-d^{3} b^{2} \dilog \left (\frac {i \left (c x -i\right )}{2}\right )+d^{3} b^{2} \dilog \left (-\frac {i \left (c x +i\right )}{2}\right )+\frac {11 b^{2} d^{3} \ln \left (c^{2} x^{2}+1\right )}{6}+\frac {7 d^{3} a b}{2 c x}+\frac {3 d^{3} b^{2} \arctan \left (c x \right )^{2}}{2 c^{2} x^{2}}-4 i d^{3} b^{2} \arctan \left (c x \right ) \ln \left (c x \right )-\frac {i d^{3} b^{2}}{c x}+\frac {7 d^{3} b^{2} \arctan \left (c x \right )}{2 c x}+\frac {i d^{3} b^{2} \arctan \left (c x \right )^{2}}{c x}-4 i d^{3} a b \ln \left (c x \right )\right )\) | \(701\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (a+b\,\mathrm {atan}\left (c\,x\right )\right )}^2\,{\left (d+c\,d\,x\,1{}\mathrm {i}\right )}^3}{x^5} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________